Anonymous's picture

Example

Project:Texture Utility Library
Version:0.9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:open
Description

Example doesnt compile


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

What is the error message?

slenkar's picture

#2

This is in monodevelop:

The type or namespace name 'linq' does not exist in the namespace 'system'
The type or namespace name 'UpdateFrameEventArgs' could not be found
The type or namespace name 'RenderFrameEventArgs' could not be found
The type or namespace name 'ResizeEventArgs' ' does not exist in the namespace 'OpenTK.Platform'

the Fiddler's picture

#3

Ok, this can be solved relatively easily:

  1. Add a reference to System.Core.dll (Visual Studio seems to do this automatically, while MonoDevelop doesn't).
  2. Rename UpdateFrameEventArgs and RenderFrameEventArgs to FrameEventArgs.
  3. Rename ResizeEventArgs to EventArgs.
  4. In the Resize event handler, rename e.Width and e.Height to Width and Height respectively.

Once you get this to work, consider attaching the file here so objarni can include it into a new TexUtil release. Thanks!

slenkar's picture

#4

I get this now:

'EventArgs' does not exist in the namespace OpenTK.Platform

Tate74's picture

#5

I had to add reference to dll's
see attached image (screen shot.)

problem #1:
...../Game.cs(20,30): error CS0507: `UnprojectTest.OnUpdateFrame(OpenTK.FrameEventArgs)': cannot change access modifiers when overriding `protected' inherited member `OpenTK.GameWindow.OnUpdateFrame(OpenTK.FrameEventArgs)'
...../opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.dll (Location of the symbol related to previous error)
...../Game.cs(34,30): error CS0507: `UnprojectTest.OnRenderFrame(OpenTK.FrameEventArgs)': cannot change access modifiers when overriding `protected' inherited member `OpenTK.GameWindow.OnRenderFrame(OpenTK.FrameEventArgs)'
..../opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.dll (Location of the symbol related to previous error)

problem #2:
......../opentk-1.0-beta-2/Source/QuickStart/Game.cs(33,14): error CS0104: `Vector3' is an ambiguous reference between `OpenTK.Vector3' and `OpenTK.Math.Vector3'
......./opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.dll (Location of the symbol related to previous error)
......./opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.Compatibility.dll (Location of the symbol related to previous error)
........./opentk-1.0-beta-2/Source/QuickStart/Game.cs(79,16): error CS0104: `Vector3' is an ambiguous reference between `OpenTK.Vector3' and `OpenTK.Math.Vector3'
........./opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.dll (Location of the symbol related to previous error)
......../opentk-1.0-beta-2/Binaries/OpenTK/Debug/OpenTK.Compatibility.dll (Location of the symbol related to previous error)

cannot change access modifiers
in monodevelop apparently the "access modifiers" for "OnUpdateFrame(FrameEventArgs e)"
and "OnRenderFrame(FrameEventArgs e)" is protected.

and I had to remove the line:
using OpenTK.Math;

in order to resolve the ambiguity with `Vector3'

next
...../opentk-1.0-beta-2/Source/QuickStart/Game.cs(88,20): error CS1620: Argument `7' must be passed with the `ref' keyword

added "ref" in the line:
//object boxedZ = (float)0.0; // wrong - cant use 'T6' type nonnullable.
float boxedZ = (float)0.0;
GL.ReadPixels(x, viewport[3] - y, 1, 1, PixelFormat.DepthComponent, PixelType.Float,ref boxedZ);

(anyway I used it in the QuickStart project to spare the need to add references again so it might
be related to this specific sample demo only).

hope this information may help someone , I added it here for good intention. :)

AttachmentSize
opentkCompatibilityDLL.jpg62.3 KB