c++ - OpenGL 3.2 2D rendering issues -


I accept that I am not a graphics programmer first, so please with me Be bare) For some unusual reasons, when I make two phantom batches and attempt to draw only one frame of my screen (or around) halfway in half, "Lost"; This little campfire happens regardless of the position of the Sprite.

When rendering wireframe modes are the same results, it does not appear that a large black polygon is being prepared and overloaded under tilemap laying.

This is the code used to start OpenGL:

  GlobalGone Mod (GL_fron_backback, GL_Fill); GlEnableClientState (GL_VERTEX_ARRAY); GlActiveTexture (GL_TEXTURE1); GlActiveTexture (GL_TEXTURE0); Gloditrange (0.0 f, 1.0f); GlEnable (GL_DEPTH_TEST); GlDisable (GL_CULL_FACE); GlEnable (GL_TEXTURE_2D); GlDisable (GL_LIGHTING); GlDepthFunc (GL_LEQUAL); GlDisable (GL_DITHER); GlClearDepth (1.0f); GlEnable (GL_CW); GlEnable (GL_BLEND); Globefenk (GLICCR_ALPHA, GL_ONMINUSISUSRCCLAAPHA);   

I uploaded the relevant code here:

SDL2 is used for window construction and context management, although I do not use anything else with SDL .

Any thoughts?

Thank you!

The problem was solved, after unloading the array / alarm buffers after calling GlDrawElements No.

It was to be kept after glDrawElements:

  glBindVertexArray (0); Glubbind Buffer (GL_ARRAY_BUFFER, 0); Glubbind Buffer (GL_ELEMENT_ARRAY_BUFFER, 0);    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -