Advertisement Jump to content
  • Advertisement

texel3d

Member
  • Content Count

    133
  • Joined

  • Last visited

Community Reputation

156 Neutral

About texel3d

  • Rank
    Member
  1. No. I do not succed If you have ideas, i am interested.
  2. Sorry for the mistake. I have also tried it and i have:   Error 2 Undefined namespace. The 'using' URI refers to a namespace 'Microsoft.Advertising.Mobile.UI' that could not be found. C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 8 14 MyGame.Windows Error 3 The type 'UI:AdControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 26 MyGame.Windows Error 1 The name "AdControl" does not exist in the namespace "using:Microsoft.Advertising.Mobile.UI". C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 25 MyGame.Windows Error 4 error WMC0001: Unknown type 'AdControl' in XML namespace 'using:Microsoft.Advertising.Mobile.UI' C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 26 MyGame.Windows
  3. As i say, i have already tried it.
  4. It's the same thing:   Error 2 Undefined namespace. The 'using' URI refers to a namespace 'Microsoft.Advertising.WinRT.UI' that could not be found. C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 8 14 MyGame.Windows Error 3 The type 'UI:AdControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 26 MyGame.Windows Error 1 The name "AdControl" does not exist in the namespace "using:Microsoft.Advertising.WinRT.UI". C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 25 MyGame.Windows Error 4 error WMC0001: Unknown type 'AdControl' in XML namespace 'using:Microsoft.Advertising.WinRT.UI' C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml 25 26 MyGame.WindowsPhone
  5. I think so. I have right click on the windows phone project -> add -> References -> Add new references -> Windows Phones 8.1 -> extension -> Microsoft Advertising SDK for windows phone 8.1 (XAML)
  6. I don't know exactelly what to do.   I have added Microsoft Advertising SDK for Windows Phone 8.1 (XAML) to the Wndows Phone project of the Universal App Solution generated by the Cocos2D-x Tools.   In OpenGLESPage.xaml (in shared project), i have added: xmlns:UI="using:Microsoft.Advertising.Media.UI" on the top of the xaml page I have added in the page: <UI:AdControl ApplicationId="d25517cb-12d4-4699-8bdc-52040c712cab" AdUnitId="10043107" HorizontalAlignment="Left" Height="250" VerticalAlignment="Top" Width="250"/>   I have this error: Error    1    The type 'UI:AdControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml    25    26    MyGame.Windows Error    2    The name "AdControl" does not exist in the namespace "using:Microsoft.Advertising.Media.UI".    C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml    25    25    MyGame.Windows Error    3    error WMC0001: Unknown type 'AdControl' in XML namespace 'using:Microsoft.Advertising.Media.UI'    C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml    25    26    MyGame.Windows Error    4    error WMC0001: Unknown type 'AdControl' in XML namespace 'using:Microsoft.Advertising.Media.UI'    C:\Dev\cocos\MyGame\proj.win8.1-universal\App.Shared\OpenGLESPage.xaml    25    26    MyGame.WindowsPhone
  7. Hi,   How can i add Ads into Universal Windows Phone App generated from Cocos2D-X v3.6 ? All tutorials i have found seems outdated. Nothings seems to work for me :(   Thanks.
  8. It woks without VAO now. I use  format.setProfile(QSurfaceFormat::CompatibilityProfile);   I think i can build an OpenGL ES program for desktop and the same for Android. I don't need to use OpenGL. But my new question is: How can i modify my code of my QWindow (not a QGLWidget) to support OpenGL ES for Android project ?  The same code above crash at execution for android project (executed on desktop). I have just added: format.setRenderableType(QSurfaceFormat::OpenGLES); Maybe i should start an another thread.
  9. This example do not seems to use Vertex Array: http://qt-project.org/doc/qt-4.8/opengl-cube.html
  10. OpenGL ES do not seems to support glGenVertexArrays: https://www.khronos.org/opengles/sdk/docs/man3/html/glGenVertexArrays.xhtml
  11. Hi,   i want to display a triangle using OpenGL 3.3 and QT. I have tried an example on the web which display a triangle using VBO + VAO + GLSL it works. But now, i want to modify the code to use only VBO+GLSL (no VAO)(i want to make it compatible with OpenGL ES for the future). But it displays nothing.   This is the code which works unsing VAO: void MyGLWindow::InitVAO() { const float vertexData[] = { // x y z w 0.0f, 0.5f, 0.0f, 1.0f, 0.5f, -0.366f, 0.0f, 1.0f, -0.5f, -0.366f, 0.0f, 1.0f, // R G B A 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, }; // create Vertex Buffer Object glGenBuffers(1, &VB_Position); glBindBuffer(GL_ARRAY_BUFFER, VB_Position); glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); // create Vertex Array Object glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER, VB_Position); glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0); glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 0, (void*)48); glBindVertexArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); } void MyGLWindow::RenderWithVAO() { m_context->makeCurrent(this); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(m_program->programId()); glBindVertexArray(VAO); glDrawArrays(GL_TRIANGLES, 0, 3); glBindVertexArray(0); glUseProgram(0); m_context->swapBuffers(this); } This is my code which do not use VAO, just VBO. I don't know why it does not work. void MyGLWindow::InitVBOSeveralArrays() { float vertexPositionData[] = { // x y z w 0.0f, 0.5f, 0.0f, 1.0f, 0.5f, -0.366f, 0.0f, 1.0f, -0.5f, -0.366f, 0.0f, 1.0f }; float vertexColorData[] = { // R G B A 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f }; int indexData[] = { 0,1,2 }; glGenBuffers(1, &VB_Position); // create Vertex Buffer Object glBindBuffer(GL_ARRAY_BUFFER, VB_Position); // bind it to the GL_ARRAY_BUFFER glBufferData(GL_ARRAY_BUFFER, 4*3*sizeof(float), vertexPositionData, GL_STATIC_DRAW); // copy data to GPU glBindBuffer(GL_ARRAY_BUFFER, 0); // bind the GL_ARRAY_BUFFER to 0 glGenBuffers(1, &VB_Color); // create Vertex Buffer Object glBindBuffer(GL_ARRAY_BUFFER, VB_Color); // bind it to the GL_ARRAY_BUFFER glBufferData(GL_ARRAY_BUFFER, 4*3*sizeof(float), vertexColorData, GL_STATIC_DRAW); // copy data to GPU glBindBuffer(GL_ARRAY_BUFFER, 0); // bind the GL_ARRAY_BUFFER to 0 glGenBuffers( 1, &VB_Index ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER_ARB, VB_Index ); glBufferData( GL_ELEMENT_ARRAY_BUFFER_ARB, 3*sizeof(int), indexData, GL_STATIC_DRAW_ARB ); glBindBuffer(GL_ARRAY_BUFFER, 0); } void MyGLWindow::RenderWithVBOSeveralArrays() { m_context->makeCurrent(this); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); glUseProgram(m_program->programId()); GLuint positionIndex = glGetAttribLocation(m_program->programId(), "position"); GLuint colorIndex = glGetAttribLocation(m_program->programId(), "color"); // Vertices glBindBuffer(GL_ARRAY_BUFFER_ARB, VB_Position); glVertexAttribPointer(positionIndex, 4, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(positionIndex); // Color glBindBuffer(GL_ARRAY_BUFFER_ARB, VB_Color); glVertexAttribPointer(colorIndex, 4, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(colorIndex); // Indices glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB, VB_Index); glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, nullptr); // Draw glDisableVertexAttribArray(positionIndex); glDisableVertexAttribArray(colorIndex); glUseProgram(0); m_context->swapBuffers(this); } Do you have some ideas ? I have attached a very simple source code of the project. Thanks.
  12. Thanks. There is not a lot of documentation about D3DDECLTYPE_FLOAT16_2 and D3DDECLTYPE_FLOAT16_4. Can i use 16 bits in CreateVertexBuffer() ? using which FVF flag ?   I can also read Microsoft documentation: "The most important things with vertex performance is to use a 32-byte vertex, and to maintain good cache ordering." http://msdn.microsoft.com/en-us/library/windows/desktop/bb173428%28v=vs.85%29.aspx
  13. Hi,   (Using DirectX 9) Is it possible and usefull to use 16 bits values instead of 32 bits values for vertexbuffer and/or in hlsl shaders in order to have better performance and/or memory ressources ?   I can use D3DFMT_INDEX16 for my index buffer, can i have 16 bits values in by vertexbuffers ? What about HLSL shaders ?   Thanks.
  14. [color=#000000][font=arial][size=1]Hi,[/font] [color=#000000][font=arial][size=1] I need to render a 3d engine with a fov of 180 degrees.[/font][color=#000000][font=arial][size=1] If i do that, i will have a big distortion of the image.[/font] [color=#000000][font=arial][size=1] Which technic can i use to solve the problem ?[/font][color=#000000][font=arial][size=1] Is the only solution to split the scene rendering using 3 cameras having a fov of 60 degree (3x60=180) ?[/font][color=#000000][font=arial][size=1] With this solution, i have to read the scenegraph 3 times for each frame render. And if i display a road, the lines will have some "breaks", it will not be continue.[/font] [color=#000000][font=arial][size=1] Thanks.[/font]
  • 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!