Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

152 Neutral

About Misiu

  • Rank
  1. seems like I’ve made some progress, I was rendering without buffers in gles, seems like I cant do that in gl.   thanks for your help all.
  2.   yes nothing from glGetProgramInfoLog.       color = Vector4f(1.0f, 1.0f, 1.0f, 1.0f);   yes those read and set the location of the Uniforms   and heres the locations set for the attributes. shader = Resource::Instance()->GetAssetShader(L"textureshader"); shader->BindAttribLocation(0, "vPosition"); shader->BindAttribLocation(1, "vTexCoord"); shader->Link();
  3. opengl logs dont show any shader errors, ive made changes but still nothing. #version 410 in vec4 vPosition; in vec2 vTexCoord; out vec2 fTexCoord; uniform mat4 mpv; uniform vec4 color; void main() { gl_Position = vPosition * mpv; fTexCoord = vTexCoord; } #version 410 //precision mediump float; in vec2 fTexCoord; out vec4 output_color; uniform sampler2D intexture; uniform vec4 color; void main() { output_color = (texture(intexture, fTexCoord) * color).rgba; } thanks.
  4. I'm trying to port a game of mine from android to the pc(linux), the following code is used to draw a 2d sprite, and works in android,   this is the render code, shader is a wrapper class for shader handling. GLfloat verts[] = { position.x, position.y + size.y, 0.0f, src.left, src.bottom, position.x, position.y, 0.0f, src.left, src.top, position.x + size.x, position.y + size.y, 0.0f, src.right, src.bottom, position.x + size.x, position.y, 0.0f, src.right, src.top }; GLushort indices[] = {0, 2, 1, 1, 2, 3}; Matrix4f p; if(rotation != 0.0f) { Matrix4f rotmat, trans; trans.Translate(Vector3f(-rotpos.x, -rotpos.y, 0.0f)); rotmat.RotationZ(RAD(rotation)); rotmat = trans * rotmat; trans.Translate(Vector3f(rotpos.x, rotpos.y, 0.0f)); p = trans * rotmat; } Matrix4f mpv = Graphics::GetOrtho(); p = mpv * p; shader->Use(); int loc = shader->GetUniformLocation("intexture"); texture->Use(); shader->Uniform1i(loc, 0); loc = shader->GetUniformLocation("mpv"); shader->UniformMatrix(loc, p); loc = shader->GetUniformLocation("color"); shader->UniformVec4(loc, color); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(float) * 5, verts); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 5, &verts[3]); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices); vertex shader #version 410 attribute vec4 vPosition; attribute vec2 vTexCoord; varying vec2 fTexCoord; uniform mat4 mpv; uniform vec4 color; void main() { gl_Position = vPosition * mpv; fTexCoord = vTexCoord; } fragment shader #version 410 //precision mediump float; varying vec2 fTexCoord; uniform sampler2D intexture; uniform vec4 color; void main() { gl_FragColor = texture2D(intexture, fTexCoord) * color; } Any help would be gratefull. Thanks.
  5. I'm using FFmpeg and OpenAL for all my audio playback in my project. but having trouble finding any info on getting the length of my audio or video that I'm playing, could someone point me in the right direction or provide a snippet please. Thank you.
  6. thanks very much, working with c++
  7. im trying to do Huffman compression which acquires me to stores values at bit level. 1's and 0's only prob is how would i add these 8 1's & 0's to the byte. tnx
  8. Misiu

    quadratic or simutanous? equations

    thanks very much, nice explenation made it clear for me.
  9. ive got my self in a pickle and didnt know where else to turn. The distance, S, meters from a fixed point of a vehicle traveling in a straight line with a constant acceleration a m/s^2, is given by S = ut + ((1/2)at)^2, where u is the initial velocity in m/s and t is the time in secs. determine the initial velocity and the acceleration given that s = 42m when t = 2 secs. and s = 144m when t = 4 secs. find also the distance traveled after 3 secs. im confused big time. ive got two equations 42 = u2 + ((1/2)a2)^2 144 = u4 + ((1/2)a4)^2 but dont know what to do with em. ive been googling for the last 4 hours. thanks for any help.
  10. lol @ toolmaker, no worrys nothing is mandatory. 38 so far. almost to 50. thanks guys
  11. thanks guys, 24 completed so far, hoping to get to 50. question 2 im trying to find if people think the mouse works well for what it is. question 3 , well basically the mouse been around 30 years? now or close to it, it hasnt changed much, is there a better way? tnx again
  12. i hope this is not breaking the rule by putting this link here. Survey Click Here basically its a survey, for my research on my BTEC course, I'm redeveloping a computer mouse, there are only 12 questions so i would appreciate if a few of you would be willing to take a few minute and answer, also non of the question are mandatory,tnx tnx again.
  13. hi people, i want to create a warping effect like that of geometry wars for the 360, now i just need help being pointed in the right direction, for my grid would a grid on a texture be best or draw lines and vertex or pixel shaders which to use for this type of effect. tnx
  14. well no messages from the debug dll about any problems D3DXMATRIX Ortho2D; D3DXMATRIX Identity; D3DXMatrixOrthoOffCenterLH(&Ortho2D, 0.0f, 800.0f, 600.0f, 0.0f, 0.0f, 1.0f); D3DXMatrixIdentity(&Identity); DXUTGetD3DDevice()->SetTransform(D3DTS_PROJECTION, &Ortho2D); DXUTGetD3DDevice()->SetTransform(D3DTS_WORLD, &Identity); DXUTGetD3DDevice()->SetTransform(D3DTS_VIEW, &Identity); thats the only ones set tnx
  15. thank you 10. DIAGNOSTIC TECHNIQUE: set D3DRS_ZENABLE to false to see if improper coordinates or transformations (including projection) are depth-culling the geometry. did the trick. tnx again
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!