Re: Missing definitions? GLbyte, GL_R8UI
Ian Mallett <[email protected]> Mon, 6 Jan 2014 01:58:58 -0800
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAG4NV=uB_8-VygmvPKS+tXYfb+37v+whLqOe23RcrafbS8BmoA@mail.gmail.com> |
On Mon, Jan 6, 2014 at 1:46 AM, Carl Olsson <[email protected]> wrote: > I'm targeting OpenGL 3.3 so I figured the texture_rg stuff would be > part of the core API. > It is, but you don't have an OpenGL 3.3 core context. I'm fairly sure PyOpenGL sets up an OpenGL 2 context. I'm working on an 8-bit indexed-colour (palette) image renderer so I > need unnormalised integer textures to properly store the pixel > information. > > All the other typedefs I've tried work fine (GLfloat, GLint, GLuint, > etc.) just GLbyte doesn't seem to be defined for some reason."GLbyte = > ctypes.c_ubyte" does the trick though for numpy data type. > I'll assume this is for using VBOs or something. Otherwise, you shouldn't need these C typenames in Python, IIRC. > I am basically new to OpenGL (dabled a little over a decade ago on a > software OpenGL renderer as my video card at the time didn't support > OpenGL :p), this is partly an exercise to learn the modern shader > pipeline, so I figured the forward compatibility would prevent > anything undesirably legacy creeping in. > I typically have my students start with OpenGL 2, as the required concepts are far simpler. Getting triangles on the screen and learning how to manipulate them at the intuitive level requisite for graphics programming is hard enough without setting up GLSL shaders and grokking in fullness the rendering pipeline. As you're new to OpenGL, that recommendation stands as mine for you as well. However, if you still want to learn GL 3+ style straight off, I recommend the Lighthouse 3D tutorials, which are both technically virtuous and accessible. Regarding GL_R8UI, as I said, you probably won't need it for a while. Use GL_RGBA or GL_RGB for loading standard color textures. Ian ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net _______________________________________________ PyOpenGL-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyopengl-users